// 表单字段类型定义
const FormDataType = [
    "number",   // id
    "string",   // title
    "number",   // businessType
    "string",   // requestMethod
    "number",   // operatorType
    "string",   // operName
    "string",   // deptName
    "string",   // operIp
    "number"    // status
];

// 表单默认数据
const FormData = {
    id: null,
    title: "",
    businessType: null,
    requestMethod: "",
    operatorType: null,
    operName: "",
    deptName: "",
    operIp: "",
    status: null
};

// 字段标签
const labels = {
    id: "日志主键",
    title: "模块标题",
    businessType: "业务类型",
    requestMethod: "请求方式",
    operatorType: "操作类别",
    operName: "操作人员",
    deptName: "部门名称",
    operIp: "主机地址",
    status: "操作状态"
};

// 选项配置
const options = {
    businessType: [
        { value: 0, label: "其它" },
        { value: 1, label: "新增" },
        { value: 2, label: "修改" },
        { value: 3, label: "删除" }
    ],
    operatorType: [
        { value: 0, label: "其它" },
        { value: 1, label: "后台用户" },
        { value: 2, label: "手机端用户" }
    ],
    status: [
        { value: 0, label: "正常" },
        { value: 1, label: "异常" }
    ],
    requestMethod: [
        { value: "GET", label: "GET" },
        { value: "POST", label: "POST" },
        { value: "PUT", label: "PUT" },
        { value: "DELETE", label: "DELETE" }
    ]
};

// 统一导出配置
export const OperLogFormConfig = {
    FormData,
    FormDataType,
    labels,
    options
};

export default OperLogFormConfig;